<?php
class MyDb extends PDO
{
    private $config = '';
    public function __construct($dsn, $username, $passwd)
    {
        $this->config = include "/config.php";
        try
        {
            $dsn = $this->config['DSN'];
            $username = $this->config['USERNAME'];
            $passwd = $this->config['PASSWD'];
        }catch(Exception $e)
        {
            exit($e->getMessage());
        }
        parent::__construct($dsn, $username, $passwd);
    }
}
?>